﻿<div ng-init="init();" class="kmi-layout-content A10-content">
    <div class="kmi-header-row">
        <div class="kmi-side-btn left" ng-click="back();">
            <i class="material-icons">&#xE408;</i>
            <div class="kmi-can-click"></div>
        </div>
        <div class="header-title" ng-bind="'A10.title' | translate"></div>
        <button ng-click="loadMyFavorites();">
            <img src="image/smes_v340/W_Com_Love_nor_32.png"></img>
            <div class="kmi-can-click"></div>
        </button>
        <!--<button ng-click="loadSysSettings();">
            <img src="image/smes_v340/setting.png"></img>
            <div class="kmi-can-click"></div>
        </button>-->
        <div class="header-logo"></div>
    </div>
    <!-- 20201210 modify by 外包 for M#83236: 派工作业 - 增加流程卡列印 -->
    <div class="kmi-layout-main-content" ng-show="showMode == 'query' || showMode == 'preview'">
        <div class="kmi-layout-page">
            <div class="edit-mask" ng-show="(Mode == 'EditSendWork' || Mode == 'EditSeq' || Mode == 'Rollback')"></div>
            <div class="kmi-text-fields condition-panel" ng-class="{'hide-panel':Mode != '' && Mode != 'EditSendWork'}">
                <label class="label" ng-bind="'A02.areaNo' | translate"></label>
                <!-- 20231211 modify by Alan for#152757: 修正input寬度 -->
                <input ng-model="selectareaName" readonly="readonly" ng-click="loadAreaList();"
                    ng-disabled="Mode != '' && Mode != 'EditSendWork'"></input>
                <div class="tip"><i class="material-icons">&#xE5CF;</i></div>
                <label class="label" style="padding-left:8px;" ng-bind="'A02.workStation' | translate"></label>
                <input ng-model="selectWorkStationName" readonly="readonly" ng-click="loadWorkStationList();"
                    mdl-toast="{{selectWorkStationName}}" ng-disabled="Mode != '' && Mode != 'EditSendWork'"></input>
                <div class="tip"><i class="material-icons">&#xE5CF;</i></div>
                <label class="label" style="padding-left:8px;" ng-bind="'A02.assigned_date' | translate"></label>
                <!--18036 日期控件-->
                <input mdl-datepicker="value_s" mdl-date-max="value_e" placeholder="{{'C00.date'|translate}}"
                    style="margin-right: 16px; flex: 0 0 100px; text-align:center;"></input>
                <div class="tip"  style="right: 10px; color: #000000;" ng-bind="'~'"></div>
                <input mdl-datepicker="value_e" mdl-date-min="value_s" placeholder="{{'C00.date'|translate}}"
                    style="margin-left: 8px; flex: 0 0 100px; text-align:center;"></input>
            </div>
            <div ng-show="showTipsFlag && moreInfoList.length > 0" id="popover_id" class="popover" style="left: 108px;display: block; visibility: visible;position: absolute; background-color: rgba(100,100,100,0.8) !important;color: #fff !important;padding: 6px 20px 6px 20px;z-index: 9999;border-radius: 6px; min-width:200px;">
                <div class="triangle-up" style="width: 0;height: 0;border-left: 15px solid transparent;border-right: 15px solid transparent;border-bottom: 10px solid rgba(100,100,100,0.8);position: absolute;top: -10px;left: 45%;"></div>
                <div class="popover-content">
                    <div ng-repeat="more in moreInfoList track by $index">
                        <div ng-bind="(more.fieldName?(more.fieldName+'：'):'')  + tempRow[more.fieldId]"></div>
                    </div>
                </div>
            </div>
            
            <div ng-show="dispatchedShowTipsFlag && dispatchedMoreInfoList.length > 0" id="popover_id_wait" class="popover" style="left: 108px;display: block; visibility: visible;position: absolute; background-color: rgba(100,100,100,0.8) !important;color: #fff !important;padding: 6px 20px 6px 20px;z-index: 9999;border-radius: 6px; min-width:200px;">
                <div class="triangle-up" style="width: 0;height: 0;border-left: 15px solid transparent;border-right: 15px solid transparent;border-bottom: 10px solid rgba(100,100,100,0.8);position: absolute;top: -10px;left: 45%;"></div>
                <div class="popover-content">
                    <div ng-repeat="more in dispatchedMoreInfoList track by $index">
                        <div ng-bind="(more.fieldName?(more.fieldName+'：'):'')  + dispatchedTempRow[more.fieldId]"></div>
                    </div>
                </div>
            </div>

            <div class="conten-panel machine-panel">
                <!--18036 查询所在-->
                <div class="kmi-text-fields kmi-list__title">
                    <label class="label" style="padding-left:8px;" ng-bind="'A10.machine' | translate"></label>
                    <input ng-model="assigned_machine"></input>
                    <label class="label" style="padding-left:8px;" ng-bind="'A10.wo_no' | translate"></label>
                    <input ng-model="assigned_wo_no"></input>
                    <label class="label" style="padding-left:8px;" ng-bind="'A10.plot_no' | translate"></label>
                    <input ng-model="assigned_plot_no"></input>
                    <label class="label" style="padding-left:8px;" ng-bind="'A10.is_urgent' | translate"></label>
                    <div class="check-point-switch" ng-class="{'is-selected':do_flag == 0}" ng-click="ClickDoFlag();">
                        <div style="width:24px;height:24px;"></div>
                    </div>

                    <div class="kmi-button kmi-button-confrim" ng-click="assigned_search()" style="width:100px">
                        <label ng-bind="'common.btn.search' | translate"></label>
                        <div class="kmi-can-click"></div>
                    </div>
                    <div class="kmi-button kmi-button-cancel" ng-click="assigned_clear()" style="width:100px">
                        <label ng-bind="'common.btn.clear' | translate"></label>
                        <div class="kmi-can-click"></div>
                    </div>
                </div>
                <!--18036 列表所在-->
                <div class="conten-panel work-panel" style="-index: 1; border-top: 0px; border-radius: 0 0 4px 4px;">
                    <div class="kmi-list machine-work-list column-selector" column-selector-id="machineWorkList" kmi-scrollbar="1980px">
                        <div class="kmi-list__header">
                            <!-- 20211217 modify by Alan for#104583 : 刪除last_date與next_date -->
                            <!-- 20230911 modify by Alan for#136071 : 修正全選不易點選 -->
                            <div class="kmi-list__column width-fixed require" style="flex:0 0 28px;"></div>
                            <!--<div class="kmi-list__column" style="flex:0 0 32px;"></div>-->
                            <div class="kmi-list__column width-fixed require" style="flex:0 0 68px;">
                                <button class="mdl-button mdl-js-button mdl-button--icon" ng-click="detailRollbackAll()">
                                    <img ng-show="roll_back_all_bool == false" src="image/icons/check0.png" class="">
                                    <img ng-show="roll_back_all_bool == true" src="image/icons/check1.png" class="ng-hide">
                                </button>
                            </div>
                            <div class="kmi-list__column" style="flex:0 0 36px;" ng-bind="'A02.list.column19' | translate" ng-show="dispatchedMoreInfoList.length > 0"></div>
                            <div class="kmi-list__column" style="flex:0 0 125px;" ng-bind="dispatched_show_label.WORKDATE" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 125px;" ng-bind="dispatched_show_label.OPNO" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 125px;" ng-bind="dispatched_show_label.OPNAME" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 125px;" ng-bind="dispatched_show_label.EQUIPMENTNO" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 125px;" ng-bind="dispatched_show_label.EQUIPMENTNAME" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 200px;" ng-bind="dispatched_show_label.LotNo" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 125px;" ng-bind="dispatched_show_label.Qty" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 125px;" ng-bind="dispatched_show_label.qty_not_in" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 80px;" ng-bind="dispatched_show_label.ProductNo" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 125px;" ng-bind="dispatched_show_label.ProductName" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 125px;" ng-bind="dispatched_show_label.ItemSpec" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 125px;" ng-bind="dispatched_show_label.CombinedTag" ng-show="dispatched_show_flag.batch_mark"></div>
                            <div class="kmi-list__column" style="flex:0 0 165px;" ng-bind="dispatched_show_label.StdDispStartTime" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 165px;" ng-bind="dispatched_show_label.StdDispEndTime" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 250px;" ng-bind="dispatched_show_label.DispStartTime" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 250px;" ng-bind="dispatched_show_label.DispEndTime" ng-show="dispatched_show_flag.op_no"></div>
                            <div class="kmi-list__column" style="flex:0 0 125px;" ng-bind="dispatched_show_label.monodate" ng-show="dispatched_show_flag.op_no"></div>
                        </div>

                        <div class="kmi-list__row-content">
                            
                            <div id="sortablelist">
                                <!-- 20211217 modify by Alan for#104583 : 刪除last_date與next_date -->
                                <div class="kmi-list__row" ng-repeat="detail in QueryLotInfo track by $id(detail)" ng-class="{'log-priority':detail.HotLot=='1'}">
                                    <div class="kmi-list__column" style="flex:0 0 28px;">
                                        <div class="kmi-list__column-left-btn">
                                            <button class="sortable-btn mdl-button mdl-js-button mdl-button--icon" ng-show="detail.states==0">
                                                <img src="image/icons/change_h.png"></img>
                                            </button>
                                        </div>
                                    </div>
                                    <!--<div class="kmi-list__column" style="flex:0 0 32px;"><div class="kmi-column-light" ng-class="[mwlightColor(detail.states)]"></div></div>-->
                                    <div class="kmi-list__column" style="flex:0 0 36px;">
                                        <button class="mdl-button mdl-js-button mdl-button--icon" ng-click="detailRollback($index,detail);">
                                            <img ng-show="detail.checked!='Y'" src="image/icons/check0.png"></img>
                                            <img ng-show="detail.checked=='Y'" src="image/icons/check1.png"></img>
                                        </button>
                                    </div>
                                    <div class="kmi-list__column" style="flex:0 0 36px;" id="{{'detail' + $index}}" ng-mouseenter="showDispatchTips(detail, $event, $index)" ng-mouseleave="hideDispatchTips(detail, $event)" ng-show="dispatchedMoreInfoList.length > 0">
                                        <button class="mdl-button mdl-js-button mdl-button--icon"
                                                style="width: 24px; background: #1ab7cd; border-radius: 4px;">
                                            <img src="image/icons/mould.png"></img>
                                            <div class="kmi-can-click"></div>
                                        </button>
                                    </div>
                                    <!--18036 列表内容-->
                                    <div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.WORKDATE.substring(0,10)"></div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.OPNO"></div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.OPNAME"></div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.EQUIPMENTNO"></div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.EQUIPMENTNAME"></div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 200px;" ng-bind="detail.LotNo"></div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.Qty"></div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.qty_not_in"></div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 80px;" ng-bind="detail.ProductNo"></div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.ProductName"></div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.ItemSpec"></div>
                                    <!--<div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.CombinedTag"></div>-->
                                    <div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-show="dispatched_show_flag.batch_mark">
                                        <div class="kmi-text-fields kmi-tag-fields" ng-show="detail.CombinedTag">
                                            <div class="kmi-button-content">
                                                <div class="kmi-button">
                                                    <label ng-bind="detail.CombinedTag"></label>
                                                    <i class="material-icons" ng-click="deleteBatchMergeMark(detail);">close</i>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.StdDispStartTime"></div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.StdDispEndTime"></div>
                                    <!--<div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.DispStartTime"></div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.DispEndTime"></div>-->
                                    <div class="kmi-list__column column-border" style="flex:0 0 250px;" >
                                        <div class="kmi-text-fields" style="padding:4px;">
                                            <label ng-bind="detail.dis_start_date"></label>
                                            <input readonly="readonly" ng-model="detail.dis_start_time" ng-click="time_open_set($event,detail,detail.dis_start_time,4);" style="max-width:100px;margin: 0em 1em;">
                                        </div>
                                    </div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 250px;" >
                                        <div class="kmi-text-fields" style="padding:4px;">
                                            <label ng-bind="detail.dis_end_date"></label>
                                            <input readonly="readonly" ng-model="detail.dis_end_time" ng-click="time_open_set($event,detail,detail.dis_end_time,5);" style="max-width:100px;margin: 0em 1em;">
                                        </div>
                                    </div>
                                    <div class="kmi-list__column column-border" style="flex:0 0 125px;" ng-bind="detail.monodate"></div>
                                    <!--列表内容 end-->

                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="kmi-list__page-content" ng-show="Mode == 'MachineExpend'">
                        <!--<div class="kmi-button kmi-button-cancel" ng-click="closeMachine();" style="width:100px">
                            <label ng-bind="'common.btn.close' | translate"></label>
                            <div class="kmi-can-click"></div>
                        </div>-->
                    </div>
                    <div class="kmi-list__page-content" ng-show="Mode == 'EditSeq'">
                        <div class="kmi-button kmi-button-confrim" ng-click="confirmEditSeq();" style="width:100px">
                            <label ng-bind="'A02.btn.confirm' | translate"></label>
                            <div class="kmi-can-click"></div>
                        </div>
                        <div class="kmi-button kmi-button-cancel" ng-click="cancelEditSeq();" style="width:100px">
                            <label ng-bind="'A02.btn.cancel' | translate"></label>
                            <div class="kmi-can-click"></div>
                        </div>
                    </div>
                    <div class="kmi-list__page-content" ng-show="Mode == 'Rollback'">
                        <!-- 20201210 modify by 外包 for M#83236: 派工作业 - 增加流程卡列印 -->
                        <div class="kmi-button kmi-button-confrim" ng-click="preview();" style="width:100px">
                            <label ng-bind="'A02.btn.print' | translate"></label>
                            <div class="kmi-can-click"></div>
                        </div>
                        <!--批次合并-->
                        <!--<div class="kmi-button kmi-button-confrim" ng-click="confirmBatchMerge();" style="width:100px" ng-if="selectRollback > 1">-->
                            <div class="kmi-button kmi-button-confrim" ng-click="confirmBatchMerge();" style="width:100px" ng-if="selectRollback > 1 && BatchMergeFlag == true">
                            <label ng-bind="'A02.btn.batchMerge' | translate"></label>
                            <div class="kmi-can-click"></div>
                        </div>
                        <div class="kmi-button kmi-button-confrim" ng-click="confirmTransfer();" style="width:100px" ng-if="selectRollback == 1">
                            <label ng-bind="'A02.btn.transfer' | translate"></label>
                            <div class="kmi-can-click"></div>
                        </div>
                        <div class="kmi-button kmi-button-confrim" ng-click="confirmRollback();" style="width:100px">
                            <label ng-bind="'A02.btn.rollback' | translate"></label>
                            <div class="kmi-can-click"></div>
                        </div>
                        <div class="kmi-button kmi-button-cancel" ng-click="cancelRollback();" style="width:100px">
                            <label ng-bind="'A02.btn.cancel' | translate"></label>
                            <div class="kmi-can-click"></div>
                        </div>
                    </div>
                </div>

                <!--18036 翻页所在-->
                <div class="page-content" style="border: 0px;">
                    <div class="page-icon">
                        <img src="image/icons/dropleft.png"></img>
                        <div class="kmi-can-click" ng-click="prevPage();"></div>
                    </div>
                    <label ng-bind="pageInfo.nowPage+' / '+pageInfo.totlePage"></label>
                    <div class="page-icon">
                        <img src="image/icons/dropright.png"></img>
                        <div class="kmi-can-click" ng-click="nextPage();"></div>
                    </div>
                </div>
            </div>
                
            </div>
    </div>
    <!-- 20201210 modify by 外包 for M#83236: 派工作业 - 增加流程卡列印 -->
    <div class="kmi-layout-page" ng-show="showMode == 'print'" style="padding: 0;">
        <iframe id="kmi-pdf-panel" name="kmi-pdf-panel"></iframe>
    </div>
    <div class="kmi-layout-footer" ng-show="showMode == 'print'">
        <button class="mdl-button mdl-js-button mdl-button--fab mdl-shadow--custom mdl-button--custom1 sub"
                ng-click="print();">
            <img src="image/icons/print.png"></img>
        </button>
        <button class="mdl-button mdl-js-button mdl-button--fab mdl-shadow--custom mdl-button--custom1 sub"
                ng-click="download();">
            <img src="image/icons/download.png"></img>
        </button>
        <button class="mdl-button mdl-js-button mdl-button--fab mdl-shadow--custom mdl-button--custom1"
                ng-click="cancel();">
            <img src="image/icons/close.png"></img>
        </button>
    </div>
</div>
